URL Parameter Passing

Passing calculated values in URLs

Code Customization
Passing calculated values in URLs
Description:

Primary keys, foreign keys and other field values are easily passed from page to page via URL parameters established with settings in the Bindings tab of the Properties dialog. Sometimes, however, you may need to pass calculated values via URL parameters. For example, you might wish to pass the grand total of a table column on one page as an input value to another page:

http://MyApp/Page.aspx?Total= FreightGrandTotal.Text()

Or you might wish to pass the value of a dynamically retrieved session variable to a page:

http://MyApp/Page.aspx?Value=Session("Test")

You can do this with a code customization that overrides the ModifyRedirectUrl() method.

This example shows how to pass the grand total of a field column in a table is passed as a URL parameter when you redirect to another page from a button in a table panel.

Note, that you can assign the value of URL parameter or Session variable to any control on the page or use it in Query useing Formula. See Formula usage examples help.

You can also pass calculated field as a URL parameter when you redirect to a page from button in a record control. For this, you can use the code customization provided here. However you have to move the code from table control class to record control class and modify it to pass your own calculated value.

This customization will be added in:

..\<Application Name>\<Table Name>\Show<Table Name>Table.aspx.cs

For example: C:\MyApp1\Orders\ShowOrdersTable.aspx.cs

Procedure:

Step 1:  In Iron Speed Designer, switch to Layout Editor and select a table panel.

Step 2:  Drag and drop a Grand total control from the Totals tab in the Toolbox to any desired cell. Please note that Page total and Grand total controls can only be added to the DataGrid region of a table panel. Your generated application will automatically calculate the grand total.

Remember the name of this grand total control because you need to know this to select a value for the grand total control variable in the Code Customization Wizard.

Step 3:  Use this wizard to add code customization.

Step 4:  Build and run the application.

Note:

This customization is applicable only to a show or editable table control.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.

Terms of Service Privacy Statement